<div id='expense-list'>
<span style="float:left;">
	<h1>Listing all expenses for group <%=h @user.group.name %></h1>
</span>
<span style="float:right; margin-top: 20px;">
	<%= link_to image_tag('../images/silk/arrow_left.png', :class=>'icon') + ' Back', url_for(:back), :class=> 'icon-link' %>
</span>
<div class='clear'></div>
<table class="data-table">
	<thead>
		<tr>
			<th>Date Created</th>
			<th>Expense Name</th>
			<th>Expense Owner</th>
			<th>Expense Amount</th>
			<th>Expense Options</th>
		</tr>
	</thead>
	<tbody>
		<% for e in @list %>
			<tr>
			<td><%=h format_date(e.created_at) %></td>
			<td><%=h e.name %></td>
			<td><%=h e.user.name %></td>
			<td><%=h e.amount %></td>
			<td><center><%= link_to "View", e %> <% if @user == e.user %>| <%= link_to "Edit", edit_expense_path(e) %> <% end %></center> </td>
			</tr>
		<% end %>
	</tbody>
</table>

</div>